package com.shanzmoo.admin.domain.dto;

import cn.hutool.core.bean.BeanUtil;
import com.shanzmoo.db.store.entity.StorePurchasingAgentEntity;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

/**
 * 仓库采购员 保存对象
 *
 * @author Gzhao 2021-03-18
 */
@Data
@ApiModel("仓库采购员-保存对象")
public class StorePurchasingAgentSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotEmpty
    @ApiModelProperty(value = "采购员姓名")
    private String name;

    public StorePurchasingAgentEntity convertEntity() {
        StorePurchasingAgentEntity target = new StorePurchasingAgentEntity();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }
}
